﻿using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data.Mapping {
    public class MerchantCertificationMap : EntityTypeConfiguration<MerchantCertification> {
        public MerchantCertificationMap() {
            // table
            ToTable("mc_MerchantCertification", "dbo");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None)
                .IsRequired();

            // Relationships

            //HasOptional(t => t.Merchant)
            //    .WithRequired(d => d.MerchantDeclaration);

        }
    }
}
